local town = 'khal-tar'

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)		end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)		end
function onCreatureSay(cid, type, msg)		npcHandler:onCreatureSay(cid, type, msg)	end
function onThink()				npcHandler:onThink()				end

local function setTown(cid, message, keywords, parameters, node)
	local townid = getTownIdByName(town)
	doPlayerSetTown(cid, townid)
	
	npcHandler:say(town..' is now your home town. In case of you dying prematurely, I will have you ressurected at my altar.', cid)
	
	return true
end

local node1 = keywordHandler:addKeyword({'home town'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to make '.. town ..' your new home town?'})
	node1:addChildKeyword({'yes'}, setTown, {cost = 0, premium = false})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = town..' not good enough for you?'})

keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I am a priestess in the temple, of ' .. town .. ', and by the grace of the gods. I can help you make ' .. town ..' your new {home town}'})

npcHandler:addModule(FocusModule:new())